package com.kaigejava.guanchazhemoshi.javaobserver;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by kaigejava on 2019/8/12.
 */
public class ForcastConditionJava implements Observer {
    private float mTemperatrue;
    private float mPressure;
    private float mHumidity;
    @Override
    public void update(Observable o, Object arg1) {
        this.mTemperatrue=((DataParam)(arg1)).mTemperatrue;
        this.mPressure=((DataParam)(arg1)).mPressure;
        this.mHumidity=((DataParam)(arg1)).mHumidity;
        display();
    }
    public void display()
    {
        System.out.println("***Tomorrow mTemperatrue:" +(mTemperatrue+1)+"***");
        System.out.println("***Tomorrow mPressure:" +(mPressure+1)+"***");
        System.out.println("***Tomorrow mHumidity:" +(mHumidity+1)+"***");
    }
}
